/*
 * PanelWatermark.java
 *
 * Created on 2008年5月10日, 下午4:52
 */

package GUI;

import Manager.Manager;
import Operations.Wavelet.WatermarkKey;
import Operations.Wavelet.WatermarkMaker;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;
import javax.swing.filechooser.*;
/**
 *
 * @author  littlechild
 */
public class PanelWaveletWatermark extends javax.swing.JPanel {
    Manager manager;
    double maxAlpha=100;
    PanelCavas original=new PanelCavas(null);
    PanelCavas watermarked=new PanelCavas(null);
    PanelCavas diff=new PanelCavas(null);
    JFileChooser filechooser=new JFileChooser();
    WatermarkMaker watermark=new WatermarkMaker();
    WatermarkKey key=new WatermarkKey();
    /** Creates new form PanelWatermark */
    public PanelWaveletWatermark(Manager mg) {
        manager=mg;
        initComponents();
        init();
    }

    private void init() {
        this.jScrollPane4.setViewportView(original);
        this.jScrollPane5.setViewportView(watermarked);
        this.jScrollPane6.setViewportView(diff);
        this.sliderA.setMaximum((int)maxAlpha);
        this.filechooser.setCurrentDirectory(new File(System.getProperty("user.dir")));
        this.jTextField1.setText("");
        this.jTextField2.setText("");
        this.sliderT1.setValue(key.T1);
        this.sliderT2.setValue(key.T2);
        this.sliderA.setValue((int)(key.alpha*maxAlpha));
        this.original.setImage(manager.operate(Global.Global.opNone, null));
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jSplitPane3 = new javax.swing.JSplitPane();
        jSplitPane4 = new javax.swing.JSplitPane();
        jScrollPane5 = new javax.swing.JScrollPane();
        jScrollPane6 = new javax.swing.JScrollPane();
        jScrollPane4 = new javax.swing.JScrollPane();
        jLabel6 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        labelA = new javax.swing.JLabel();
        labelT1 = new javax.swing.JLabel();
        sliderT1 = new javax.swing.JSlider();
        sliderA = new javax.swing.JSlider();
        jButton2 = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();
        labelT2 = new javax.swing.JLabel();
        sliderT2 = new javax.swing.JSlider();
        save = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jTextField2 = new javax.swing.JTextField();
        browserFile = new javax.swing.JButton();
        browserKey = new javax.swing.JButton();
        check = new javax.swing.JButton();

        setPreferredSize(new java.awt.Dimension(900, 400));

        jSplitPane4.setLeftComponent(jScrollPane5);
        jSplitPane4.setRightComponent(jScrollPane6);

        jSplitPane3.setRightComponent(jSplitPane4);
        jSplitPane3.setLeftComponent(jScrollPane4);

        jLabel6.setText("Alpha:");

        jLabel3.setText("T1:");

        labelA.setText("0.2");

        labelT1.setText("40");

        sliderT1.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                sliderT1StateChanged(evt);
            }
        });

        sliderA.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                sliderAStateChanged(evt);
            }
        });

        jButton2.setText("预览");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jLabel4.setText("T2:");

        labelT2.setText("50");

        sliderT2.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                sliderT2StateChanged(evt);
            }
        });

        save.setText("保存");
        save.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                saveActionPerformed(evt);
            }
        });

        jButton1.setText("打开");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelA, javax.swing.GroupLayout.DEFAULT_SIZE, 39, Short.MAX_VALUE)
                    .addComponent(labelT1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(sliderA, javax.swing.GroupLayout.DEFAULT_SIZE, 97, Short.MAX_VALUE)
                    .addComponent(sliderT1, 0, 0, Short.MAX_VALUE))
                .addGap(58, 58, 58)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(labelT2, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE)
                        .addComponent(sliderT2, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(27, 27, 27)
                        .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE)
                        .addComponent(save, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(83, 83, 83))
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jSplitPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 611, Short.MAX_VALUE)
                    .addContainerGap()))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(14, 14, 14)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(labelT2)
                        .addComponent(jLabel4))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(labelT1)
                        .addComponent(jLabel3))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(sliderT2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(sliderT1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(labelA)
                        .addComponent(jLabel6))
                    .addComponent(sliderA, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(save)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jButton2)
                        .addComponent(jButton1)))
                .addContainerGap(289, Short.MAX_VALUE))
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addGap(87, 87, 87)
                    .addComponent(jSplitPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 257, Short.MAX_VALUE)
                    .addContainerGap()))
        );

        jTabbedPane1.addTab("添加水印", jPanel1);

        jLabel1.setText("输入文件：");

        jLabel2.setText("输入key：");

        jTextField1.setText("jTextField1");

        jTextField2.setText("jTextField2");

        browserFile.setText("浏览");
        browserFile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                browserFileActionPerformed(evt);
            }
        });

        browserKey.setText("浏览");
        browserKey.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                browserKeyActionPerformed(evt);
            }
        });

        check.setText("检测水印");
        check.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                checkActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addGap(55, 55, 55)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(jLabel1))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextField2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE)
                    .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE))
                .addGap(40, 40, 40)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(browserKey)
                    .addComponent(browserFile))
                .addGap(226, 226, 226))
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(266, 266, 266)
                .addComponent(check)
                .addContainerGap(288, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(79, 79, 79)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(jLabel1)
                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(49, 49, 49)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(jLabel2)
                            .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(browserFile)
                        .addGap(49, 49, 49)
                        .addComponent(browserKey)))
                .addGap(45, 45, 45)
                .addComponent(check)
                .addContainerGap(113, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("检测水印", jPanel2);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 636, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 383, Short.MAX_VALUE)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void preview() {
        key.T1=this.sliderT1.getValue();
        key.T2=this.sliderT2.getValue();
        key.alpha=this.sliderA.getValue()/maxAlpha;
        this.watermarked.setImage(watermark.addWatermark(this.original.getImage(), key));
        this.diff.setImage(diff(original.getImage(),watermarked.getImage()));
    }

    private void sliderT1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_sliderT1StateChanged
        // TODO add your handling code here:
        this.labelT1.setText(String.valueOf(this.sliderT1.getValue()));
}//GEN-LAST:event_sliderT1StateChanged

    private void sliderAStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_sliderAStateChanged
        // TODO add your handling code here:
        this.labelA.setText(String.valueOf(this.sliderA.getValue()/this.maxAlpha));
}//GEN-LAST:event_sliderAStateChanged

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        preview();
    }//GEN-LAST:event_jButton2ActionPerformed

    private void sliderT2StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_sliderT2StateChanged
        // TODO add your handling code here:
        this.labelT2.setText(String.valueOf(this.sliderT2.getValue()));
}//GEN-LAST:event_sliderT2StateChanged

    private void browserKeyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browserKeyActionPerformed
        // TODO add your handling code here:
        this.filechooser.setDialogTitle("打开key文件");
        FileNameExtensionFilter filter=new FileNameExtensionFilter("key","key");
        this.filechooser.setFileFilter(filter);
        int returnValue=this.filechooser.showOpenDialog(this);
        if(returnValue==JFileChooser.APPROVE_OPTION) {
            this.jTextField2.setText(this.filechooser.getSelectedFile().getPath());
         }  
}//GEN-LAST:event_browserKeyActionPerformed

    private void browserFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browserFileActionPerformed
        // TODO add your handling code here:
        //this.filechooser.setCurrentDirectory(new File(System.getProperty("user.dir")));
        this.filechooser.setDialogTitle("打开bmp文件");
        FileNameExtensionFilter filter=new FileNameExtensionFilter("BMP","BMP");
        this.filechooser.setFileFilter(filter);
        int returnValue=this.filechooser.showOpenDialog(this);
        if(returnValue==JFileChooser.APPROVE_OPTION) {
            this.jTextField1.setText(this.filechooser.getSelectedFile().getPath());
         }      
    }//GEN-LAST:event_browserFileActionPerformed

    private void checkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkActionPerformed
        try {
            // TODO add your handling code here:
            BufferedImage image = javax.imageio.ImageIO.read(new File(this.jTextField1.getText()));
            WatermarkKey keyi = WatermarkKey.read(this.jTextField2.getText());//GEN-LAST:event_checkActionPerformed
            if(watermark.testWatermark(image, keyi)) {
                JOptionPane.showMessageDialog(this,"水印存在","水印存在",JOptionPane.INFORMATION_MESSAGE);
            }
            else {
                JOptionPane.showMessageDialog(this,"水印被破坏","水印被破坏",JOptionPane.INFORMATION_MESSAGE);
            }
        } catch (IOException ex) {
            Logger.getLogger(PanelWaveletWatermark.class.getName()).log(Level.SEVERE, null, ex);
            JOptionPane.showMessageDialog(this,"读取失败","读取失败",JOptionPane.WARNING_MESSAGE);
        }
}

    private void saveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveActionPerformed
        // TODO add your handling code here:
        try {
            this.filechooser.setDialogTitle("保存图像文件");
            FileNameExtensionFilter filter=new FileNameExtensionFilter("BMP","BMP");
            this.filechooser.setFileFilter(filter);
            this.filechooser.setSelectedFile(new File("*.bmp"));
            int returnValue=this.filechooser.showSaveDialog(this);
            if(returnValue==JFileChooser.APPROVE_OPTION) {
                    javax.imageio.ImageIO.write(watermarked.getImage(), "bmp", new File(this.filechooser.getSelectedFile().getPath()));
             } 
            else
                return;
            this.filechooser.setDialogTitle("保存key文件");
            filter=new FileNameExtensionFilter("key","key");
            this.filechooser.setFileFilter(filter);
            this.filechooser.setSelectedFile(new File("*.key"));
            returnValue=this.filechooser.showSaveDialog(this);
            if(returnValue==JFileChooser.APPROVE_OPTION) {
                    WatermarkKey.write(this.filechooser.getSelectedFile().getPath(), key);
             } 
         } catch (IOException ex) {
                Logger.getLogger(PanelWaveletWatermark.class.getName()).log(Level.SEVERE, null, ex);
                JOptionPane.showMessageDialog(this,"保存失败","保存失败", JOptionPane.WARNING_MESSAGE);
         }
}//GEN-LAST:event_saveActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        this.filechooser.setDialogTitle("打开bmp文件");
        FileNameExtensionFilter filter=new FileNameExtensionFilter("BMP","BMP");
        this.filechooser.setFileFilter(filter);
        int returnValue=this.filechooser.showOpenDialog(this);
        if(returnValue==JFileChooser.APPROVE_OPTION) {
            try {
                this.original.setImage(javax.imageio.ImageIO.read(this.filechooser.getSelectedFile()));
            } catch (IOException ex) {
                Logger.getLogger(PanelWaveletWatermark.class.getName()).log(Level.SEVERE, null, ex);
                JOptionPane.showMessageDialog(this,"打开失败","打开失败", JOptionPane.WARNING_MESSAGE);
            }
         }      
    }//GEN-LAST:event_jButton1ActionPerformed
    
    @Override
    public void paintComponent(Graphics g){
        super.paintComponent(g);
        this.jSplitPane3.setDividerLocation(1.0/3);
        this.jSplitPane4.setDividerLocation(0.5);
    }
    private BufferedImage diff(BufferedImage image1,BufferedImage image2) {
        assert image1.getWidth()==image2.getWidth() && image1.getHeight()==image2.getHeight();
        BufferedImage returnImage=new BufferedImage(image1.getWidth(),image1.getHeight(),image1.getType());
        for(int i=0;i!=image1.getWidth();++i) {
            for(int j=0;j!=image1.getHeight();++j) {
                int rgb=0;
                rgb=image1.getRGB(i,j)&0xff;
                rgb-=image2.getRGB(i,j)&0xff;
                rgb=rgb<0 ? -rgb: rgb;
                rgb=(rgb)|(rgb<<8)|(rgb<<16);
                returnImage.setRGB(i, j, rgb);
            }
        }
        return returnImage;
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton browserFile;
    private javax.swing.JButton browserKey;
    private javax.swing.JButton check;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JSplitPane jSplitPane3;
    private javax.swing.JSplitPane jSplitPane4;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JLabel labelA;
    private javax.swing.JLabel labelT1;
    private javax.swing.JLabel labelT2;
    private javax.swing.JButton save;
    private javax.swing.JSlider sliderA;
    private javax.swing.JSlider sliderT1;
    private javax.swing.JSlider sliderT2;
    // End of variables declaration//GEN-END:variables
    
}
